<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://code.highcharts.com/highcharts.js"></script>
    <script>
    $(function () {
    $('#container').highcharts({
        chart: {
            type: 'bar',
            animation: Highcharts.svg,
            marginRight: 10,
            events: {
                load: function() {
                    var series = this.series[0];
                    setInterval(function () {
                        series.setData([['a',60],['b',40],['c',20],['d',0]]);

                    },1000);

                }
            }
        },
        xAxis: {
            type: 'category',
            labels: {
                rotation: 0,
                style: {
                    fontSize: '13px',
                    fontFamily: 'Verdana, sans-serif'
                }
            }
        },
        legend: {
            layout: 'vertical',
            floating: true,
            backgroundColor: '#FFFFFF',
            align: 'right',
            verticalAlign: 'top',
            y: 60,
            x: -60
        },
        tooltip: {
            formatter: function () {
                return '<b>' + this.series.name + '</b><br/>' +
                    this.x + ': ' + this.y;
            }
        },
        series: [{
            data: [['a',10],['b',20],['c',50],['d',100]],
            dataLabels: {
                enabled: true,
                rotation: 0,
                align: 'left',
                style: {
                    fontSize: '13px',
                    fontFamily: 'Verdana, sans-serif'
                }
            }
        }]
    });

                // the button action
    $('#button').click(function () {
        var chart = $('#container').highcharts();
        chart.series[0].setData([['a',60],['b',40],['c',20],['d',0],['a',60],['b',40],['c',20],['d',0],['a',60],['b',40],['c',20],['d',0],['a',60],['b',40],['c',20],['d',0]]);
    });
});
    </script>
</head>
<body>
    <button id="button" class="autocompare">Set new data</button>
    <div id="container" style="height: 400px"></div>


</body>
</html>

